package user

import (
	"log"

	"github.com/gin-gonic/gin"
)

type User struct{}

type UserId struct {
	Id int `json:"id" form:"id"`
}

func (user *User) ReceiveUserId(ctx *gin.Context) *UserId {
	userId := &UserId{}
	err := ctx.ShouldBindQuery(userId)
	log.Print(userId)
	if err != nil {
		log.Panicf("ReceiveUserId参数接收错误%v", err)
	}
	return userId
}
